import request from '@/axios'
import { ValidParamType } from './types'

//分页查询表单校验配置
export const pageApi = (data) => {
  return request.post({ url: '/dbms-server/base/requestvalid/page', data })
}

//删除表单校验配置
export const delApi = (params) => {
  return request.delete({ url: '/dbms-server/base/requestvalid/delete', params })
}
//启用禁用
export const checkstateApi = (params) => {
  return request.put({ url: '/dbms-server/base/requestvalid/checkstate', params })
}

//验证集合
export const rulesApi = (params): Promise<IResponse<ValidParamType>> => {
  return request.get({ url: '/dbms-server//base/requestvalid/rules', params })
}

//复制表单校验配置
export const copyApi = (params) => {
  return request.put({ url: '/dbms-server/base/requestvalid/copy', params })
}
